package br.ufpe.cin.rgms.linha.apresentacao;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.ufpe.cin.rgms.Facade;
import br.ufpe.cin.rgms.linha.modelo.Linha;

public class DetalharLinhaServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		Linha linha = Facade.getInstance().getLinha(Integer.parseInt((String) req.getParameter("linha")));

		req.setAttribute("linhaconsulta", linha);

		RequestDispatcher view = req.getRequestDispatcher("detalharlinha.jsp");
		view.forward(req, resp);
	}

}
